﻿using Domain.Entity.Department;
using Domain.Entity.Dictionary;
using Domain.Entity.Flow;
using Domain.Entity.Form;
using Domain.Entity.OperationLogD;
using Domain.Entity.Permission;
using Domain.Entity.Role;
using Domain.Entity.User;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Infrastructure.DataAccess
{
    public class MySqlDbContext:DbContext
    {
        public MySqlDbContext(DbContextOptions<MySqlDbContext> options) : base(options)
        {
        }
        //6.17
        /// <summary>
        /// 用户信息表
        /// </summary>
        public virtual DbSet<UserInfo> UserInfos { get; set; }
        /// <summary>
        /// 角色信息表
        /// </summary>
        public virtual DbSet<RoleInfo> RoleInfos { get; set; }
        /// <summary>
        /// 权限信息表
        /// </summary>
        public virtual DbSet<PermissionInfo> PermissionInfos { get; set; }
        /// <summary>
        /// 用户角色关系表
        /// </summary>
        public virtual DbSet<RoleUsers> RoleUsers { get; set; }
        /// <summary>
        /// 角色权限关系表
        /// </summary>
        public virtual DbSet<RolePermissions> RolePermissions { get; set; }
        //6.25
        /// <summary>
        /// 部门表
        /// </summary>
        public virtual DbSet<Departments> Departments { get; set; }
        //6.26
        /// <summary>
        /// 访问日志记录表
        /// </summary>
        public virtual DbSet<OperationLog> OperationLog { get; set; }
        //6.29
        /// <summary>
        /// 表单设计表
        /// </summary>
        public virtual DbSet<FormDesignInfo> FormDesignInfos { get; set; }
        //7.3
        /// <summary>
        /// 流程配置表
        /// </summary>
        public virtual DbSet<WorkFlow> WorkFlows { get; set; }
        /// <summary>
        /// 流程结点配置表
        /// </summary>
        public virtual DbSet<WorkFlowStep> WorkFlowSteps { get; set; }
        /// <summary>
        /// 审批流程表
        /// </summary>
        public virtual DbSet<WorkFlowTable> WorkFlowTables { get; set; }
        /// <summary>
        /// 审批流程结点表
        /// </summary>
        public virtual DbSet<WorkFlowTableStep> WorkFlowTableSteps { get; set; }
        /// <summary>
        /// 审批日志记录表
        /// </summary>
        public virtual DbSet<WorkFlowTableAuditLog> WorkFlowTableAuditLogs { get; set; }
        //7.5
        /// <summary>
        /// 字典主表
        /// </summary>
        public virtual DbSet<DictionaryKey> DictionaryKeys { get; set; }
        /// <summary>
        /// 字典明细表
        /// </summary>
        public virtual DbSet<DictionaryValue> DictionaryValues { get; set; }
    }
}
